<template>
  <div>
    <h1>Container of Custom Component</h1>
    <button @click="updateSlot">Update Slot Content</button>
    <CustomComponent>
      <div v-if="customHTML" v-html="customHTML"></div>
      <div v-else>
        <p>
          Lorem ipsum dolor sit amet
        </p>
      </div>
    </CustomComponent>
  </div>
</template>
<script>
import CustomComponent from './CustomComponent.vue';

export default {
  data: () => ({
    customHTML: null
  }),
  components: {
    CustomComponent
  },
  methods: {
    updateSlot() {
      this.customHTML = '<p>Foo bar baz</p>'
    }
  }
}
</script>
<style lang="">

</style>